package top.wangjiu.java.jvm.constantinfo;

/**
 * @ClassName Invalid
 * @Description TODO
 * @Author wangjiu
 * @Date 2022/1/14 1:41 下午
 */
public class InvalidCPInfo extends ConstantPoolInfo{

    public final static short TAG = -1;
    public final static short INFO_LENGTH = 0;

    private final short index;

    public InvalidCPInfo(short index){
        this.index = index;
    }

    @Override
    public short tag() {
        return TAG;
    }

    @Override
    public short index() {
        return index;
    }

    @Override
    public short infoLength() {
        return INFO_LENGTH;
    }

    @Override
    public String toFullString(ConstantPoolInfo[] poolInfos) {
        return null;
    }

    @Override
    public String toString(ConstantPoolInfo[] poolInfos) {
        return null;
    }
}
